package com.bjpowernode.controller;

import com.bjpowernode.entity.TDicType;
import com.bjpowernode.entity.TProductDO;
import com.bjpowernode.result.R;
import com.bjpowernode.service.DicTypeService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class DicTypeController {

    @Resource
    private DicTypeService dicTypeService;

    @GetMapping(value = "/api/dic/{typeCode}")
    public R ongoingActivity(@PathVariable(value = "typeCode") String typeCode) {
        TDicType tDicType = dicTypeService.getDicTypeByTypeCode(typeCode);
        return R.OK(tDicType);
    }
}
